import request from '@/utils/request';

//查看公告列表
export function getNoticeList(data) {
  return request({
      url: `/notice/`,
      method: 'get',
      timeout: 3000,
  })
}
//发布公告
export function setNotice(data) {
  return request({
      url: `/notice/`,
      method: 'post',
      data:data
  })
}
//发布公告
export function updataNotice(id,data) {
  return request({
      url: `/notice/${id}/`,
      method: 'put',
      data:data
  })
}
//公告详情
export function noticeDetails(id) {
  return request({
      url: `/notice/${id}/`,
      method: 'get',
  })
}
//删除公告
export function delNotice(id) {
  return request({
      url: `/notice/${id}/`,
      method: 'delete',
  })
}
//排序公告
export function sortNotice(data) {
  return request({
      url: `/notice/order/`,
      method: 'post',
      data:data,
  })
}